import db,uicomponents,log,constants
import os

def initModules():
	log.logger.debug('initing shared ui components...')
	uicomponents.SharedUi.init()

	log.logger.debug('importing server modules...')

	for root,dirs,files in os.walk(constants.app_path+'\servers'):
		for name in dirs:
			log.logger.debug('	checking %s...' % name)
			if not name.startswith("~"):
				__import__('servers.%s' % name , globals(), locals(), ['ui','definitions'])	
				log.logger.debug('	OK')
				log.logger.info('server %s called!' % name)
			else:
				log.logger.debug('	FAULT')
